from pyframe.exceptions.xml_serializable_exception import XmlSerializableException

from value_string import ValueString
from value_number import ValueNumber

def create(type, value):

	if(type is None or type == 'string'):
		return ValueString(value)

	if(type == 'number'):
		return ValueNumber(value)

	raise XmlSerializableException(type, 'param-type-unsupported')